<%@ taglib prefix="s" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/taglibs.jsp" %>
<html>
<head>
    <title>Title</title>
    <script src="${ctx}/js/views/specially/searchSendMessage.js"></script>
</head>
<body ng-app="myApp" style="overflow:scroll;overflow-x:hidden">

<core:import url="../common/pageHead.jsp">
    <core:param name="title" value="查询报文记录信息 "/>
</core:import>

<div ng-controller="queryCtrl" class="container-fluid">
    <form id="queryForm" name="queryForm" action="${ctx}/riskInfo/sendMessageQuery/search"
          class="form-inline" autocomplete="off">
        <table table-detail>
            <tr>
                <td class="text-right">
                    报文种类：
                </td>
                <td>
                    <select ng-model="vm.queryBean.kind" class="{{vm.constant.inputClass}}"
                            required name="type"
                            ng-options="key as value for (key,value) in vm.cached.MESSAGE_TYPE_FOR_SPECIALLY">
                        <option value="">请选择</option>
                    </select>
                </td>
                <td class="text-right">
                    报文类型：
                </td>
                <td>
                    <select ng-model="vm.queryBean.type" class="{{vm.constant.inputClass}}"
                            required name="type"
                            ng-options="key as value for (key,value) in {'01':'请求报文','02':'响应报文','03':'推送报文','04':'回执报文'}">
                        <option value="">请选择</option>
                    </select>
                </td>
                <td class="text-right">
                    报文生成时间：
                </td>
                <td>
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup="yyyy-MM-dd"
                           ng-model="vm.queryBean.messageDate"/>
                </td>
            </tr>
            <tr>
                <td colspan="8" class="textCenter">
                    <button type="button" ng-click="vm.queryDetail()" class="btn btn-default">查询</button>
                    <button type="button" ng-click="vm.resetForm()" class="btn btn-default">重置</button>
                </td>
            </tr>
        </table>
    </form>

    <div>
        <table table-detail>
            <thead>
            <tr>
                <th>报文种类</th>
                <th>报文类型</th>
                <th>报文生成时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody ng-repeat="bean in vm.pagination.list track by $index" >
                <tr>
                    <td>{{vm.cached.MESSAGE_TYPE_FOR_SPECIALLY[bean.kind]}}</td>
                    <td>{{{'01':'请求报文','02':'响应报文','03':'推送报文','04':'回执报文'}[bean.type]}}</td>
                    <td>{{bean.messageDate | date:'yyyy-MM-dd'}}</td>
                    <td>
                        <button type="button" class="btn btn-info btn-sm"  ng-click="vm.querySendMessageDetail(bean)" title="打开报文详情页面">报文详情</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>

    <core:import url="../common/pageFoot.jsp"/>
</div>
<core:import url="../common/nav.jsp"/>
</body>
</html>
